/*    */ package cn.zzuisa.news.service.impl;

/*    */
/*    */ import cn.zzuisa.news.entity.News;
/*    */ import cn.zzuisa.news.entity.Page;
/*    */ import cn.zzuisa.news.form.NewsEditForm;
/*    */ import cn.zzuisa.news.form.NewsForm;
/*    */ import cn.zzuisa.news.repository.NewsRepository;
/*    */ import cn.zzuisa.news.repository.UserRepository;
/*    */ import cn.zzuisa.news.repository.dao.NewsDAO;
/*    */ import cn.zzuisa.news.repository.dao.UserDAO;
/*    */ import cn.zzuisa.news.service.NewsService;
/*    */ import java.util.List;

/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */ public class NewsServiceImpl/*    */ implements NewsService
/*    */ {
	/* 24 */ private NewsRepository newsDAO = new NewsDAO();
	/* 25 */ private UserRepository userDAO = new UserDAO();

	/*    */
	/*    */
	/*    */
	/*    */
	/* 30 */ public List<News> list() {
		return this.newsDAO.list();
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 36 */ public boolean add(NewsForm newsForm) {
		return (boolean) ((this.userDAO.addpoint(newsForm.getuId()) > 0) ? this.newsDAO.add(newsForm) : 0);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 42 */ public List<News> listpass() {
		return this.newsDAO.listpass();
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 48 */ public News findById(Integer id) {
		return this.newsDAO.findById(id);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 54 */ public boolean setState(Integer state, Integer id) {
		return this.newsDAO.setState(state, id);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 60 */ public Page page(Integer current, Integer size, String sql) {
		return this.newsDAO.page(current, size, sql);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 66 */ public Page ListByTypesName(Integer current, Integer size, String sql, String name) {
		return this.newsDAO.ListByTypesName(current, size, name, sql);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 72 */ public Page search(Integer current, Integer size, String sql, String keyWords) {
		return this.newsDAO.search(current, size, keyWords, sql);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 78 */ public boolean edit(NewsEditForm newsEditForm) {
		return this.newsDAO.edit(newsEditForm);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 84 */ public boolean click(Integer id) {
		return this.newsDAO.click(id);
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 90 */ public Page pagelist(Integer current, Integer size, String sql, String keyWords) {
		return this.newsDAO.pagelist(current, size, sql, keyWords);
	}
	/*    */ }

/*
 * Location:
 * /Users/frank/Desktop/admin/WEB-INF/classes/!/cn/zzuisa/news/service/impl/
 * NewsServiceImpl.class Java compiler version: 8 (52.0) JD-Core Version: 1.0.7
 */